Access authorization API

ABSTRACT

A facility for setting and revoking policies is provided. The facility receives a request from a controlling process a request to set a policy on a controlled process, and determines whether the controlling process has privilege to set the policy on the controlled process. If the facility determines that the controlling process has privilege to set the policy on the controlled process, the facility sets the policy on the controlled process, which causes the policy to be applied to the controlled process to determine whether the controlled process has authorization to access one or more resources.

TECHNICAL FIELD

The described technology is directed to computer security and, moreparticularly, to controlling access to resources on a computer system.

BACKGROUND

As dependence on computers and computer networks increases along withthe sophistication and the frequency of attacks on computers andcomputer networks, the subject of computer security is becoming evermore prominent in the industry. Current computer security techniques areinadequate in protecting application programs and operating systems frommalicious software (“malware”)—e.g., viruses, worms, andtrojans—designed specifically damage or disrupt a computer system, andother undesirable activity.

Existing access control security models typically rely on a user'scredentials to authorize access to resources on a computer. In thesemodels, every process that runs or executes with the same credentials isgiven the same access rights, whether or not the process needs access toall the resources that is available to the user. Also, a process thatneeds access to a resource, e.g., to read, write, etc., specifies therequired access at the time the resource is accessed.

For example, a user logs on to a personal computer with a user account,and expects to be able to access all word processing documents stored onthe personal computer and created using a particular word processingprogram. In order to satisfy this expectation, a conventional accesscontrol security system grants all programs running in the user'scontext permission to access to all of the aforementioned wordprocessing documents. This is a grant of an excess level of permission,however, because few programs running in the user context actually needto access to any of the word processing documents.

Typically, malware infects processes by exploiting code defects. Oncemalware runs inside of a compromised process, it inherits the accessrights of the user context in which the process is running, and getsaccess to all resources that are available to the user, which might befar greater than what the original process ever needed.

Accordingly, an integrated approach to access authorization thatimproves and enhances the security of resources on a computer will havesignificant utility.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating selected components typicallyincorporated in at least some of the computer systems on which thefacility executes.

FIG. 2 is a block diagram illustrating selected components of thefacility, according to some embodiments.

FIG. 3 illustrates an example policy suitable for use by the facility,according to some embodiments.

FIG. 4 illustrates a flow chart of a method by which the facilityperforms auditing of denied access requests, according to someembodiments.

FIG. 5 illustrates a flow chart of a method by which the facilityperforms auditing of inherently dangerous operations, according to someembodiments.

FIG. 6 illustrates a flow chart of a method by which the facilityperforms learning to facilitate fine-tuning of a policy, according tosome embodiments.

FIG. 7 illustrates a flow chart of a method by which the facilityprovides a tiered access control check, according to some embodiments.

FIG. 8 illustrates a flow chart of a method by which the facilitydetermines a level of security risk of an application program, accordingto some embodiments.

FIG. 9 illustrates a flow chart of a method by which the facilityimposes a more restrictive policy upon detecting an anomaly, accordingto one embodiment.

FIG. 10 illustrates a flow chart of a method by which the facilityimposes a policy upon detecting an anomaly, according to someembodiments.

FIG. 11 is a block diagram illustrating a communications flow used bythe facility in some embodiments to set a policy on a target process.

FIG. 12 is a block diagram illustrating a communications flow used bythe facility in some embodiments to set a revocable policy on a targetprocess.

FIG. 13 is a block diagram illustrating a communications flow used bythe facility in some embodiments to set a self-imposed policy on aprocess.

FIG. 14 is a block diagram illustrating a communications flow used bythe facility in some embodiments to set a revocable self-imposed policyon a process.

FIG. 15 is a block diagram illustrating a communications flow used bythe facility in some embodiments to perform a client-server accesscontrol check.

FIG. 16 illustrates a process by which the facility extracts a policyembedded in an application program, according to some embodiments.

FIG. 17 is a flow chart of a method by which the facility loads andapplies a policy on a legacy application program, according to someembodiments.

DETAILED DESCRIPTION

A software facility (“facility”) for protecting a computer system fromthe adverse effects arising from exploits against application andoperating system programs on the computer system is described. In someembodiments, the facility adds a logic-driven access control layer tothe operating system. The facility may provide an authorization modulethat receives authorization queries for various security-sensitiveresource accesses and returns a decision to allow or deny a resourceaccess based on a policy. A policy is a set of rules and practices thatdetermine how a resource—such as, by way of example, a network, a filesystem, an application program, etc.—is managed and protected.

The authorization module may be queried directly by the variousoperating system components that service resource access requests issuedby user mode programs, e.g., application programs executing in a usercontext. Alternatively, the authorization module may be queried by an“interception layer” sitting on top of such operating system components.The interception layer is code that intercepts the system call functionsused by the user mode programs to access the resources, and applies“wrappers” to the intercepted system call functions. The authorizationmodule makes its access control decisions (i.e., allow or deny) based onan identity of a principal, which is either the identity of theapplication program—e.g., application process—attempting the resourceaccess, the identity of a user, or a combination of the identity of theapplication program and the identity of the user on whose behalf theapplication program is executing; a policy that applies to theprincipal; and the identity of the resource and action that theprincipal seeks to perform.

In some embodiments, the facility provides an application programinterface (API) by which a process, such as an application programprocess, sets or revokes policies (e.g., access restrictions). As usedherein, an API includes one or more related functions. The policies maybe set at the process level or at a thread level. Once an accessrestriction is set using the API, the access restrictions are enforcedby the facility. Types of API may include a behavior-controller API, aself-imposed API, and a client-server API.

The behavior-controller API enables a process to set access restrictionson a target process, affecting all process threads or only certain,specified process threads in the target process. The access restrictionsmay either be revocable or irrevocable. If the access restrictions arerevocable, the access restrictions can be lifted or revoked bysubsequently making a request to the facility, such as by calling a liftrestriction API provided by the facility. The request to revoke theaccess restrictions may be made by the controlling process, i.e., theprocess that set the access restrictions. In some embodiments, therequest to revoke the access restrictions may be made by a process otherthan the controlling process, such as the controlled process or aprocess other than the controlling or controlled process, as long as theprocess making the request is authorized to do so. For example, anidentifier may be used in conjunction with the request to revoke toindicate authorization or otherwise authenticate the requestor of therequest to revoke. If the access restrictions are irrevocable, theaccess restrictions cannot be lifted or revoked. Moreover, the accessrestrictions may either be cumulative with any existing policy for thetarget process or may be substituted for the current policy for thetarget process. For example, using the behavior-controller API, a parentor controlling process can set a policy on a child or controlledprocess. Subsequently, when the child or controlled process makes arequest to access a resource, the authorization module checks the policyto determine whether to allow or deny the request.

The self-imposed API enables a process to set access restrictions onitself, affecting all process threads or only certain, specified processthreads like access restrictions set with the behavior-controller API,access restrictions set with the self-imposed API may either berevocable or irrevocable. If the access restrictions are revocable, theaccess restrictions can be lifted or revoked by subsequently making arequest to the facility. If the access restrictions are irrevocable, theaccess restrictions cannot be lifted or revoked. Moreover, the accessrestrictions may either be cumulative with any existing policy for thetarget process or may be substituted for the current policy for thetarget process. For example, a process may startup with no policy or aless restrictive policy in effect, which enables the process to performits more aggressive resource accesses. Subsequently, after startup andbefore starting more risky activities, e.g., listening over a networkand receiving network traffic, the process may use the self-imposed,irrevocable API to set a more restrictive policy on itself. In anotherexample, a process may use the self-imposed, revocable API to set apolicy on itself before starting a macro, causing the policy to beapplied while the macro is executing. When the macro finishes executing,the process can revoke the policy that was set prior to the execution ofthe macro.

The client-server API enables a process to request an ad hoc resourceaccess check for a non-operating system action. For example, a clientprocess may call a server process, requesting the server process toperform some action, e.g., perform some method or access particulardata. Subsequent to receiving the client request, the server processimpersonates the client process, e.g., the principal, and uses theclient-server API to check whether the client process has sufficientprivileges to perform the requested action. The server process can thendetermine whether to proceed with the requested action based on theresults of the access control check.

The various embodiments of the facility and its advantages are bestunderstood by referring to FIGS. 1-17 of the drawings. The elements ofthe drawings are not necessarily to scale, emphasis instead being placedupon clearly illustrating the principles of the invention. Throughoutthe drawings, like numerals are used for like and corresponding parts ofthe various drawings.

FIG. 1 is a block diagram illustrating selected components typicallyincorporated in at least some of the computer systems on which thefacility executes. These computer systems 100 may include one or morecentral processing units (“CPUs”) 102 for executing computer programs; acomputer memory 104 for storing programs and data-including datastructures-while they are being used; a persistent storage device 106,such as a hard drive, for persistently storing programs and data; acomputer-readable media drive 108, such as a CD-ROM drive, for readingprograms and data stored on a computer-readable medium; and a networkconnection 110 for connecting the computer system to other computersystems, such as via the Internet, to exchange programs and/ordata-including data structures.

The facility may be described in the general context ofcomputer-readable instructions, such as program modules, executed bycomputer systems 100 or other devices. Generally, program modulesinclude routines, programs, objects, components, data structures, etc.that perform particular tasks or implement particular abstract datatypes. Memory 104 and persistent storage device 106 arecomputer-readable media that may contain instructions that implement thefacility. It will be appreciated that memory 104 and persistent storage106 may have various other contents in addition to the instructions thatimplement the facility.

It will be appreciated that computer systems 100 may include one or moredisplay devices for displaying program output, such as video monitors orLCD panels, and one or more input devices for receiving user input, suchas keyboards, microphones, or pointing devices such as a mouse. Whilecomputer systems 100 configured as described above are typically used tosupport the operation of the facility, it will be appreciated that thefacility may be implemented using devices of various types andconfigurations, and having various components.

FIG. 2 is a block diagram illustrating selected components of thefacility, according to some embodiments. As illustrated in FIG. 2, thefacility includes an authorization module 202 which is implemented as anintegral component of an operating system 204 suitable for executing oncomputer system 100. Authorization module 202 generally functions as anadded protection layer to high risk processes such as network facingapplications, network facing services and operating system components,applications dealing with untrusted content, and untrusted code, e.g.,typically, code delivered via the Internet. Authorization module 202provides the logic for performing the policy driven access control ofthe resources available on computer system 100.

The facility also includes policies 206 from which authorization module202 makes its access control decisions. Policies 206 are the rules thatdetermine whether to allow or deny a request for authorization to accessa resource. In some embodiments, policies 206 get compiled intoruntime—e.g., binary—rules that get enforced by operating system 204and, in particular, authorization module 202. In some embodiments,policies 206 are implemented as part of a centralized policy store,which allows policies 206, including the rules in the policies 206, tobe revoked centrally and set centrally, for example, by users and/oradministrators.

Authorization module 202 may be queried by the various operating systemkernel components 208 that service resource access requests issued by aprincipal, e.g., a principal 212 a. Authorization module 202 may also bequeried by an interception layer 210 that intercepts the system callfunctions issued by a principal, e.g., a principal 212 b, to access theresources. Interception layer 210 applies wrappers to the interceptedsystem call functions to enable authorization module 202 to perform theaccess control check against the applicable policy 206. For example,applying a wrapper may include determining the identity of the principaland/or various environmental factors associated with computing system100 and providing this information as part of a request forauthorization to perform a system call to authorization module 202 toenable it to perform the access control check. Moreover, authorizationmodule 202 may directly be queried by a principal, e.g., a principal 212c.

In some embodiments, the access control check performed by authorizationmodule 202 is a function of a principal making the resource accessrequest and a policy that applies to the principal. As such,authorization module 202 makes its access control decisions (i.e., allowor deny) based on an identity of a principal—either the identity of acalling application program, or the combination of the identity of thecalling application program and the identity of a user on whose behalfthe application program is executing—and the rules in the policy thatare applicable to the principal. In some embodiments, authorizationmodule 202 may additionally consider parameters, such as, by way ofexample, type of access requested, environmental factors—e.g., is thecomputer on which the application program is executing inside acorporate network or connected to a public network, patch level of thecomputer, etc.—in addition to the identity of the principal and therules in the policy that are applicable to the principal in making itsaccess control decision.

In some embodiments, the facility may include an optional anomalydetection module 214 as depicted by the broken or “dashed” lines in FIG.2. Anomaly detection module 214 generally functions to monitor thebehavior of computer system 100 and the programs executing on computersystem 100 in order to detect an anomalous state. In some embodiments,anomaly detection module 214 provides the facility a first notificationupon detecting an anomaly and a subsequent, second notification upondetecting the cessation of the previously detected anomaly. This enablesthe facility to activate the enforcement of policies 206 upon detectionof an anomaly, until the anomaly has ended, after which policies 206 areno longer enforced. Alternatively, the facility may initially impose aless restrictive set of policies until an anomaly is detected, in whichcase a more restrictive set of policies are enforced, until the anomalyhas ended and the less restrictive set of policies are again enforced.Anomaly detection module 214 may detect an anomaly in either a singleprocess executing on computer system 100, a group of processes executingon computer system 100, or the entire computer system 100.

The aforementioned aspects of the facility are only illustrative and arenot intended to suggest any limitation as to the implementation of theillustrated components and/or the scope of use or functionality of thefacility. For example, in some embodiments, authorization module 202need not be implemented as part of or integral to operating system 204,but may be implemented separate of or outside operating system 204, forexample, as a non-operating system program. Moreover, in someembodiments, policies 206 need not be implemented as or a part of acentralized policy store. Thus, policies 206 need not be in one place,but may be implemented using, for example, a distributed model.Furthermore, even though policies 206 are depicted as part of orcontained in authorization module 202, policies 206 need only beaccessible by authorization module 202.

In the discussion that follows, embodiments of facility are described inconjunction with a variety of illustrative examples. It will beappreciated that the embodiments of facility may be used incircumstances that diverge significantly from these examples in variousrespects.

FIG. 3 illustrates an example policy suitable for use by the facility,according to some embodiments. The example policy includes the rules toprotect a web server application. By way of example, an applicationprocess, as indicated by item 302, requesting a resource is checked todetermine if it is a WebServerX web server process, as indicated by item304. If authorization module 202 determines that the requestingapplication process is a WebServerX web server process, authorizationmodule 202 either allows or denies authorization for the requestedresource based on the rules included in the policy.

As illustrated, the example policy contains the privileges or accessrights granted to a WebServerX process, and the default is to denyauthorization for the requested resource, as indicated by rule 306,unless the privilege or access right is specified. Stated another way,unless the requested resource is explicitly granted in the policy,authorization for the requested resource is denied. In some embodiments,the policy may contain rules that specify access restrictions, e.g.,rules that specify that authorization to perform particular actions bedenied or that deny authorization to access resources, or rules thatcause an audit, e.g., log an event.

The first rule in the example policy is a directive to permit theWebServerX process to write “$html” files, as indicated by item 308, to“$WebDirectories,” as indicated by item 310. The “$html” is arepresentation of a collection of file types, for example, *.html,*.gif, etc. The “$WebDirectories” is a representation of a collection ofdirectories configured to be web directories, and may be defined by anadministrator, such as a web administrator, who is different than thecreator of the policy, such as a security administrator. For example,authorization module 202 returns an allow decision (i.e., grant ofauthorization) based on this rule in response to a WebServerX processrequesting to write a file of a type defined by the parameter “$html” toone of the directories defined by the parameter “$WebDirectories.” Thus,a rule in the policy may apply to dynamic, independently defined groupsof objects, such as “$WebDirectories,” and dynamically configurableenvironment parameters, such as “$html.”

The second rule in the example policy is a directive to permit theWebServerX process to write to the “$FTP Upload Directory,” as indicatedby item 312, if it is executing on behalf of “user A,” as indicated byitem 314. For example, authorization module 202 returns an allowdecision (i.e., grant of authorization) based on this rule in responseto a WebServerX process executing on behalf of user A requesting towrite to the “$FTP Upload Directory.”

The third rule in the example policy is a directive to permit inboundhttp traffic, as indicated by item 316. For example, authorizationmodule 202 returns an allow decision (i.e., grant of authorization)based on this rule in response to a WebServerX process requesting toreceive inbound http data, e.g., receive http data packets transmittedover a network connection.

The fourth rule in the example policy is a directive to permit “FTPtraffic,” as indicated by item 318, if the variable “$FTP” is enabled,as indicated by item 320. Here, “$FTP” is a variable, and may be set byan administrator who is different than a security administrator whocreated the policy. For example, authorization module 202 performs arun-time check to determine if the variable “$FTP” is enabled, and ifso, returns an allow decision (i.e., grant of authorization) based onthis rule in response to a WebServerX process requesting to send orreceive data defined by the parameter “FTP traffic.” Alternatively, ifthe “$FTP” is not enabled, authorization module 202 will return a denydecision (i.e., denial of authorization) in response to theaforementioned access request as indicated by item 306.

It will be appreciated that the policy may include rules that defineprivileges for objects within and outside the operating system, such asapplication processes as illustrated by the example privilege above. Therules in a policy may be specified using a rich schema, similar towriting code using compiled or interpreted programming language. Forexample, the schema may support the inclusion of conditions and temporalconditions, e.g., “allow X only if Y,” dependencies on dynamicallyconfigurable environment parameters and variables, dependencies onenvironmental factors, and the like, in the rules. Moreover, the use ofparameters facilitates the creation of rules that apply to both presentand future objects. For example, documents of a particular type may berepresented by a parameter, and using the parameter, a rule can becreated that specifies a restriction that applies to all documents ofthat particular type, whether currently in existence or later created.In some embodiments, the policy may specify that certain decisions areto be relegated to the end user for decision, for example, through apop-up dialog box.

FIG. 4 illustrates a flow chart of a method 400 by which the facilityperforms auditing of denied access requests, according to someembodiments. By way of example, a user (e.g., UserABC) may have loggedon to a computer and started a word processing application (e.g., WPApp)and requested to open a file (e.g., FileX) stored in a directory (e.g.,YZDir) on the computer. As a result, WPApp issues a request to accessthe resource FileX stored in directory YZDir. Beginning at a start step,authorization module 202 receives the authorization query, e.g., arequest for authorization to access FileX stored in YZDir, at step 402.

At step 404, authorization module 202 identifies the principal that isrequesting the authorization to access FileX stored in YZDir. In theabove example, the principal may either be WPApp or the combination ofWPApp and UserABC. At step 406, authorization module 202 identifies thepolicy applicable to the identified principal, for example, from acentralized policy store such as policies 206, and performs an accesscontrol check based on the identity of the principal and the applicablepolicy. At step 408, authorization module 202 determines whether theresult of the access control check performed in step 406 is to denyaccess. Continuing the above example, authorization module 202 analyzesthe identified applicable policy to determine whether a rule orprivilege in the policy authorizes the principal to access FileX storedin YZDir, at step 408.

If authorization module 202 determines that the applicable policyauthorizes the principal to perform the requested action, then at step420, authorization module 202 returns an allow decision, which is anindication that the principal is authorized to perform the requestedaction, and proceeds to an end step. Alternatively, if authorizationmodule 202 determines that the applicable policy does not authorize theprincipal to perform the requested action, then at step 410,authorization module 202 returns a deny decision, which is an indicationthat the principal is not authorized to perform the requested action. Atstep 412, authorization module 202 may return an error string to theprincipal, informing the principal of the lack of authorization toperform the requested action.

At step 414, authorization module 202 checks to determine whetherauditing is enabled. A flag or a record associated with the applicablepolicy or rule may indicate whether to perform auditing. If auditing isnot enabled, authorization module 202 proceeds to an end step.Alternatively, if auditing is enabled, authorization module 202 makes anentry in an audit log at step 416. The entry may identify the deniedrequest, the failed rule, the principal, and/or the requested resource.

At step 418, authorization module 202 may trigger one or more eventsbased on the auditing of the denied request. For example, authorizationmodule 202 may provide a security administrator an indication, e.g., viaemail, voice mail, text messaging, etc., of the attempt by the principalto perform an unauthorized action, terminate the application processsubsequent to the attempt by the principal to perform an unauthorizedaction, impose a stricter set of policies subsequent to the attempt bythe principal to perform an unauthorized action, and the like.Subsequent to triggering the events, authorization module 202 proceedsto an end step.

Those of ordinary skill in the art will appreciate that, for this andother processes and methods disclosed herein, the functions performed inthe processes and methods may be implemented in differing order.Furthermore, the outlined steps are only exemplary, and some of thesteps may be optional, combined with fewer steps, or expanded intoadditional steps without detracting from the essence of the invention.

FIG. 5 illustrates a flow chart of a method 500 by which the facilityperforms auditing of inherently dangerous operations, according to someembodiments. By way of example, a user (e.g., UserABC) may have loggedon to a computer and started a web browser program (e.g., WebBrowser)and requested to access a web page (e.g., PageX) on an untrusted website (e.g., WebSiteY). As a result, WebBrowser issues a request toretrieve PageX from WebSiteY. Steps 502-508 are substantially similar tosteps 402-408 of method 400.

If, at step 508, authorization module 202 determines that the applicablepolicy does not authorize the principal to perform the requested action,then at step 510, authorization module 202 returns a deny decision,which is an indication that the principal is not authorized to performthe requested action. In the above example, WebBrowser may not haveauthorization to access untrusted site WebSiteY. At step 512,authorization module 202 may return an error string to the principal,informing the principal of the lack of authorization to perform therequested action. Subsequent to returning an error string, authorizationmodule proceeds to an end step.

Alternatively, if authorization module 202 determines that theapplicable policy authorizes the principal to perform the requestedaction, then at step 514, authorization module 202 returns an allowdecision, which is an indication that the principal is authorized toperform the requested action. At step 516, authorization module 202checks to determine whether the authorized action is an inherentlydangerous operation. For example, the facility may maintain a list ofinherently dangerous operations, and authorization module 202 may checkthis list to determine if the authorized action is listed as aninherently dangerous operation.

If the authorized action is found to be an inherently dangerousoperation, then at step 518, authorization module 202 performs an auditoperation. For example, authorization module 202 may make an entry in aninherently dangerous operation audit log of an indication of the requestand authorization to perform the inherently dangerous operation. Theentry may also include an indication of the principal that requested theauthorization to perform the inherently dangerous operation.Authorization module 202 may additionally perform other actions whichmay be triggered by the authorization to perform the inherentlydangerous operation. Subsequent to performing the audit operation atstep 518, or determining that the authorized action is not an inherentlydangerous operation at step 516, authorization module 202 proceeds to anend step.

In some embodiments, authorization module 202 may make an entry in theinherently dangerous operation audit log of an indication of a requestof authorization to perform an inherently dangerous operation.Continuing the above example, assuming that accessing untrusted siteWebSiteY is indicated to be an inherently dangerous operation and,further, the applicable policy does not grant WebBrowser authorizationto access WebSiteY, authorization module 202 returns a deny decision(step 510) and records the request for authorization to perform theinherently dangerous operation and the subsequent denial ofauthorization, for example, in the inherently dangerous operation auditlog. Authorization module 202 may also record an indication of theprincipal that requested authorization to perform the inherentlydangerous activity.

FIG. 6 illustrates a flow chart of a method 600 by which the facilityperforms learning to facilitate fine-tuning of a policy, according tosome embodiments. By way of example, a user (e.g., UserABC) may havelogged on to a computer and started a web browser program (e.g.,WebBrowser) and requested to access a web page (e.g., PageX) on a website (e.g., WebSiteY). As a result, WebBrowser issues a request toretrieve PageX from WebSiteY. Steps 602-608 are substantially similar tosteps 402-408 of method 400.

If, at step 608, authorization module 202 determines that the applicablepolicy authorizes the principal to perform the requested action, then atstep 610, authorization module 202 returns an allow decision, which isan indication that the principal is authorized to perform the requestedaction, and proceeds to an end step. Alternatively, if authorizationmodule 202 determines that the applicable policy does not authorize theprincipal to perform the requested action, then at step 612,authorization module 202 checks to determine whether learning is enabledfor the rule in the policy that denies authorization to perform therequested action. Continuing the above example, a policy applicable toWebBrowser may contain a rule that expressly denies WebBrowser access tothe Internet and, thus, WebSiteY, but, may also provide an indication toapply learning instead of applying the rule.

If authorization module 202 determines that learning is not enabled forthe rule that denies authorization to perform the requested action, thenat step 618, authorization module 202 returns a deny decision, which isan indication that the principal is not authorized to perform therequested action. In the above example, the rule that expressly deniesWebBrowser access to the Internet and, thus, WebSiteY, may not have anindication to apply learning. In this instance, the rule is applied andWebBrowser is denied authorization to access WebSiteY. At step 620,authorization module 202 may return an error string to the principal,informing the principal of the lack of authorization to perform therequested action. Subsequent to returning an error string, authorizationmodule proceeds to an end step.

Alternatively, if, at step 612, authorization module 202 determines thatlearning is enabled for the rule that denies authorization to performthe requested action, then at step 614, authorization module 202 makesan entry in a learning report log of an indication of the failed rule.The entry may also include an indication of the principal that requestedthe authorization to perform the action that resulted in the failedrule. At step 616, authorization module 202 returns an allow decision,which is an indication that the principal is authorized to perform therequested action, and proceeds to an end step. Thus, instead of applyingthe applicable rule, authorization module 202 grants authorization toperform the requested action and records an indication of this event. Asecurity administrator or other interested user can then analyze thecontents of the learning report log to determine whether a rule orpolicy is too restrictive or not restrictive enough, and fine-tune therule or policy before actually enforcing or implementing the rule orpolicy.

In some embodiments, authorization module 202 may make an entry in thelearning report log of an indication of a rule that provided theauthorization to perform a requested action. Continuing the aboveexample, assuming that a rule expressly authorizes WebBrowser access tothe Internet and, thus, WebSiteY, and also provides an indication toapply learning, authorization module 202 returns an allow decision (step610) and records an indication of the rule that provided theauthorization to perform the requested action. This information may alsobe used to fine-tune the rule or policy. For example, if it isdetermined from the entries in the report log that authorization toaccess a resource was too readily granted, the rule or policy may beadjusted or altered to reduce the instances where authorization toaccess to the resource is granted.

FIG. 7 illustrates a flow chart of a method 700 by which the facilityprovides a tiered access control check, according to some embodiments.Referring again to one of the prior examples, a user (e.g., UserABC) mayhave logged on to a computer and started a word processing application(e.g., WPApp) and requested to open a file (e.g., FileX) stored in adirectory (e.g., YZDir) on the computer. As a result, WPApp issues arequest to access the resource FileX stored in directory YZDir.Beginning at a start step, authorization module 202 receives theauthorization query, e.g., a request for authorization to access FileXstored in YZDir, at step 702.

At step 704, an operating system running on the user's computer performsa conventional access control check. Continuing the above example, theoperating system may check to determine whether the user has privilegesto open (e.g., read access) FileX in YZDir. At step 706, the operatingsystem, using its conventional access check mechanism, determineswhether to deny the user access to FileX.

If the operating system's conventional access check mechanism determinesthat the user should be denied access to FileX, then at step 708, theoperating system returns a deny decision, and proceeds to an end step.The deny decision is an indication that the user is not authorized toperform the requested action, e.g., open FileX. Alternatively, if theoperating system's conventional access check mechanism determines thatthe user should not be denied access to FileX, then at step 710,authorization module 202 identifies the principal that is requesting theauthorization to access FileX stored in YZDir.

At step 712, authorization module 202 identifies the policy applicableto the identified principal, for example, from a centralized policystore such as policies 206, and performs an access control check basedon the identity of the principal and the applicable policy. Continuingthe above example, authorization module 202 analyzes the identifiedapplicable policy to determine whether a rule or privilege in the policyauthorizes the principal to access FileX stored in YZDir, at step 714.

If authorization module 202 determines that the applicable policyauthorizes the principal to perform the requested action, then at step720, authorization module 202 returns an allow decision, which is anindication that the principal is authorized to perform the requestedaction, and proceeds to an end step. Alternatively, if authorizationmodule 202 determines that the applicable policy does not authorize theprincipal to perform the requested action, then at step 716,authorization module 202 returns a deny decision, which is an indicationthat the principal is not authorized to perform the requested action. Atstep 718, authorization module 202 may return an error string to theprincipal, and proceeds to an end step. The error string may inform theprincipal of the lack of authorization to perform the requested action.

It will be appreciated that the tiered access check may be performed inthe reverse order from that illustrated by method 700. For example,authorization module 202 first performs its access control check. Ifauthorization module 202 determines that authorization should be givenfor a particular resource access, then the operating system performs itssecurity check using its conventional access control mechanism.

FIG. 8 illustrates a flow chart of a method 800 by which the facilitydetermines a level of security risk of an application program, accordingto some embodiments. In particular, the facility makes an assessment ofthe level of security risk and/or intent of an application program basedupon an analysis of a policy designated for the application program. Byway of example, a user may have logged on to a computer and requested toload and/or execute an application program on the computer.

Beginning at a start step, an operating system running on the user'scomputer receives a request to load/execute the application program atstep 802. At step 804, the operating system invokes the facility todetermine whether the application program has a corresponding policy.For example, the policy applicable to the application program may bemaintained as part of policies 206. If the facility determines that apolicy applicable to the application program does not exist, thefacility informs the operating system that an applicable policy does notexist. At step 806, the operating system denies the request toload/execute the application program and returns an error condition.Subsequent to denying the request, the operating system proceeds to anend step for this request.

Alternatively, if, at step 804, the facility determines that a policyapplicable to the application program does exist, then at step 808, thefacility analyzes the applicable policy to determine the level ofpotential security risk associated with or resulting fromloading/executing the application program. The facility may base thelevel of risk on the level or extent of authorization granted by therules in the policy. For example, if the rules authorize the applicationprogram to a lot of resources or a number of inherently dangerousresources, the facility may set the level of risk higher than if therules only authorize the application program to a few, relatively saferesources. The facility informs the operating system that an applicablepolicy does exist, and proceeds to an end step.

FIG. 9 illustrates a flow chart of a method 900 by which the facilityimposes a more restrictive policy upon detecting an anomaly, accordingto some embodiments. By way of example, the facility running on acomputer may have two policies, a PolicyA and a PolicyB, which areapplicable to an application program. Moreover, PolicyA may be lessrestrictive than PolicyB in that PolicyA grants authorization to agreater number of resources.

Beginning at a start step, the facility imposes the less restrictivePolicyA at step 902. At step 904, the facility may detect an anomalousstate in an instance of the application program executing on thecomputer. Continuing the above example, an instance of the applicationprogram may be executing on the computer, and the facility may bemonitoring the executing application program process. While monitoringthe application program process, the facility may detect an anomalouscondition or state in the process. For example, the facility may havepreviously generated a directed graph that represents the system callsnormally issued by the application program by tracking previousinstances of the application program that ran on the computer, anddetermined the presence of an anomalous state from a comparison of thesystem calls made by the current application program process and thedirected graph.

At step 906, the facility imposes the more restrictive PolicyB inresponse to detecting the anomalous state, and proceeds to an end step.In one embodiment, the facility imposes the more restrictive PolicyB onthe application program process in which the anomalous state wasdetected. Alternatively, the facility may impose the more restrictivePolicyB on the application program, e.g., all instances or processes ofthe application program. Moreover, depending on the detected anomaly,the application program, and/or the particular policy, the facility mayimpose a set of more restrictive policies on the entire computer, e.g.,more restrictive policies are applied to all processes executing on thecomputer.

FIG. 10 illustrates a flow chart of a method 1000 by which the facilityimposes a policy upon detecting an anomaly, according to someembodiments. By way of example, the facility running on a computer mayhave a policy, PolicyA, which is applicable to a web applicationprogram. Beginning at a start step, the facility does not impose thepolicy on the web application program at step 1002. Thus, PolicyA isdormant and not applied to the instances of the web application programexecuting on the computer. At step 1004, the facility may detect ananomalous state in an instance of the web application program executingon the computer.

Continuing the above example, an instance of the web application programmay be executing on the computer, and the facility may be monitoring theexecuting web application program process. While monitoring theapplication program process, the facility may detect an anomalouscondition or state in the process. For example, the facility may monitorthe network traffic generated or caused by the web application processand determine from the network traffic that an anomalous state ispresent in the web application process. At step 1006, the facilityimposes the dormant policy, PolicyA, on the web application program, forexample, on the web application program process in which the anomaly wasdetected, and proceeds to an end step. Alternatively, the facility mayimpose PolicyA on all instances or processes of the web applicationprogram. Thus, the dormant policy becomes active and applied to the webapplication program.

FIG. 11 is a block diagram illustrating a communications flow used bythe facility in some embodiments to set a policy on a target process. Byway of example, a network server process executing on a computer maywant to set a policy for a listener process that is configured to listenfor and receive network packets on behalf of the server process. In thisinstance, the server process may be considered a controlling process,and the listener process may be considered a target or controlledprocess.

As illustrated in FIG. 11, a controlling process 1102 sends a request toset a policy on a controlled process 1108 to operating system 1104running on the computer (Stage 1). The policy may be sent with therequest or may have been previously sent, in which case the request mayinclude an identifier that identifies the policy. The request is madethrough an access control API 1106. Access control API 1106 generallyfunctions to expose and make available various interfaces that may beused by application developers to set and revoke policies. In oneembodiment, access control API 1106 provides the calling conventions bywhich an application program accesses operating system 1104 to set andrevoke policies.

In response to receiving the request to set a policy, operating system1104 checks to determine whether controlling process 1102 possessesadequate privilege to set a policy on a target process (Stage 2). Forexample, operating system 1104 may require controlling process 1102 tobe executing at a higher privilege level than the privilege levelcontrolled process 1108 will be executing at. Alternatively, operatingsystem 1104 may only allow a process to set a policy on a child process.If operating system 1104 determines that controlling process 1102 hasadequate privilege, then operating system 1104 sets the policy oncontrolled process 1108. If the request includes the policy, operatingsystem 1104 stores the received policy in, for example, policies 206,and sets an indication to apply the policy. If the request includes anidentifier identifying the policy, operating system 1104 uses theidentifier to identify, e.g., locate, the policy in, for example,policies 206, and sets an indication to apply the policy. Otherwise, ifoperating system 1104 determines that controlling process 1102 does nothave adequate privilege, then operating system 1104 does not set thepolicy on controlled process 1108. Operating system 1104 returns tocontrolling process 1102 the results of the request to set a policy oncontrolled process 1108 (Stage 3).

Subsequently, when controlled process 1108 makes a request to access aresource to operating system 1104 (Stage 4), operating system 1104performs an access control check to determine whether controlled process1108 has authorization to access the resource (Stage 5). For example,operating system 1104 may utilize authorization module 202 to determinewhether there is an applicable policy and apply the rules in theapplicable policy to determine whether controlled process 1108 hasauthorization to access the resource.

Depending on the results of the access control check, operating system1104 services the request to access the resource. For example, ifoperating system 1104 determines by applying the applicable policy thatcontrolled process 1108 has authorization to access the resource,operating system 1104 proceeds to further process the request to accessthe resource. Otherwise, operating system 1104 does not further processthe request to access the resource. Operating system 1104 returns tocontrolled process 1108 the results of the request to access theresource (Stage 6).

Even though controlling process 1102 and operating system 1104 aredepicted as running on the same computer in the above and subsequentexamples, it is not meant to be limiting as those of skill in the artwill appreciate that controlling process 1102 need not be running on thesame computer as operating system 1104. For example, the request to setthe policy may be sent over a communications network. Additionally, itwill also be appreciated that controlled process 1108 may or may not bein existence at the time of the request to set a policy on controlledprocess 1108.

FIG. 12 is a block diagram illustrating a communications flow used bythe facility in some embodiments to set a revocable policy on a targetprocess. A controlling process 1202 sends, via access control API 1106,a request to set a revocable policy on a controlled process 1204 tooperating system 1104 running on a computer (Stage 1). In response toreceiving the request to set a revocable policy, operating system 1104checks to determine whether controlling process 1202 possesses adequateprivilege to set a revocable policy on a target process (Stage 2). Ifoperating system 1104 determines that controlling process 1202 hasadequate privilege, then operating system 1104 sets an indication toapply the policy on controlled process 1204. Otherwise, if operatingsystem 1104 determines that controlling process 1202 does not haveadequate privilege, then operating system 1104 does not set the policyon controlled process 1204.

Operating system 1104 returns to controlling process 1202 the results ofthe request to set a revocable policy on controlled process 1204 (Stage3). If the revocable policy was successfully set, operating system 1104returns an identifier in, for example, a “cookie” to controlling process1202. In one embodiment, the identifier authenticates the process thatset the revocable policy, and is used to identify and revoke therevocable policy. Stated another way, the identifier is akin to aprivilege or authorization to revoke the revocable policy, and issubsequently submitted to operating system 1104 with a request to revokethe policy. In other embodiments, the cookie may also include stateinformation, such as an identifier that identifies a policy that waspreviously in effect.

Subsequently, when controlled process 1204 makes a request to access aresource to operating system 1104 (Stage 4), operating system 1104performs an access control check to determine whether controlled process1204 has authorization to access the resource (Stage 5). Depending onthe results of the access control check, operating system 1104 servicesthe request to access the resource. For example, if operating system1104 determines by applying the applicable policy that controlledprocess 1204 has authorization to access the resource, operating system1104 proceeds to further process the request to access the resource.Otherwise, operating system 1104 does not further process the request toaccess the resource. Operating system 1104 returns to controlled process1204 the results of the request to access the resource (Stage 6).

Controlling process 1202 may then send, via access control API 1106, arequest to revoke a revocable policy previously set on controlledprocess 1204 to operating system 1104 (Stage 7). Alternatively,controlling process 1202 may send the cookie containing the identifierto controlled process 1204 (Stage 8), and controlled process 1204 maysubsequently send, via access control API 1106, a request to revoke arevocable policy previously set on controlled process 1204 to operatingsystem 1104 (Stage 9). In both instances, the cookie is sent with therequest to revoke a revocable policy.

In response to receiving the request to revoke a revocable policy,operating system 1104 uses the identifier contained in the cookie toauthenticate the requester as a process having authorization to revokethe indicated revocable policy. Operating system 1104 may also use theidentifier to identify the policy that is to be revoked. Subsequent toauthenticating the requestor—either controlling process 1202 (Stage 7)or controlled process 1204 (Stage 9),—operating system 1104 revokes therevocable policy currently being applied to controlled process 1202. Inanother embodiment, operating system 1104 may apply a policy that wasbeing applied to controlled process 1204 prior to the application of thejust revoked revocable policy. For example, an identifier thatidentifies the policy that was previously in effect may be passed tooperating system 1104 in the ‘cookie’ that was sent with the request torevoke a revocable policy. Alternatively, operating system 1104 may havepreserved the state information prior to applying the revocable policy,for example, in a persistent storage device on the computer.

FIG. 13 is a block diagram illustrating a communications flow used bythe facility in some embodiments to set a self-imposed policy on aprocess. By way of example, a user on a computer may have just activateda web browser application program. As part of the initializationprocess, a web browser application process 1302 sends, via accesscontrol API 1106, a request to set my policy to PolicyA to operatingsystem 1104 running on the computer (Stage 1). In response, operatingsystem 1104 sets the policy for process 1302 to PolicyA (Stage 2). Ifthe request includes PolicyA, operating system 1104 stores PolicyA in,for example, policies 206, and sets an indication to apply PolicyA. Ifthe request includes an identifier identifying PolicyA, operating system1104 uses the identifier to identify, e.g., locate, PolicyA in, forexample, policies 206, and sets an indication to apply PolicyA.Operating system 1104 returns to process 1302 the results of the requestto set my policy to PolicyA (Stage 3).

Subsequently, process 1302 continues processing with PolicyA beingactive (Stage 4). The processing may involve interaction with operatingsystem 1104. For example, the user may use process 1302 to upload one ormore web applications. Having uploaded a web application, the user mayhave requested processing of the uploaded web application throughprocess 1302. In response to the user's request, process 1302 sends, viaaccess control API 1106, a request to set my policy to PolicyB tooperating system 1104 (Stage 5). For example, process 1302, not trustingthe integrity of the uploaded and user initiated web application,requests to set the policy to a more stringent PolicyB. In response,operating system 1104 sets the policy for process 1302 to PolicyB (Stage6). Operating system 1104 returns to process 1302 the results of therequest to set my policy to PolicyB (Stage 7).

Depending on the returned results of the request to set the policy toPolicyB, process 1302 continues processing (Stage 8). For example, ifthe request to set the policy to PolicyB was successful, process 1302starts execution of the requested web application. Here, the morestringent PolicyB is applied to the web application process.Alternatively, if the request to set the policy to PolicyB wasunsuccessful, process 1302 does not start execution of the webapplication and may inform the user of an error condition, e.g., reasonfor not running the web application.

In some embodiments, PolicyB is applied to the web application processand PolicyA is in effect revoked. In this instance, PolicyA may havebeen a revocable policy. In some embodiments, both PolicyA and PolicyBare applied to the web application process. Here, PolicyA may have beenirrevocable and, thus, remains in effect along with PolicyB.

FIG. 14 is a block diagram illustrating a communications flow used bythe facility in some embodiments to set a revocable self-imposed policyon a process. By way of example, a user on a computer may be running anapplication program, and may have come to a point where a macro is to beexecuted. Knowing the processing that is to be performed by the macro,application process 1402 sends, via access control API 1106, a requestto set my revocable policy to PolicyA to operating system 1104 runningon the computer (Stage 1). For example, PolicyA may be a morerestrictive policy than a policy that is currently being applied toprocess 1402.

In response, operating system 1104 sets the policy for process 1402 toPolicyA (Stage 2), and returns to process 1402 the results of therequest to set my revocable policy to PolicyA (Stage 3). If PolicyA wassuccessfully set, operating system 1104 may also return a cookiecontaining an identifier and/or state information, e.g., informationregarding any previous policy that was being applied prior to PolicyA,to process 1402. The identifier is used to authenticate the holder as aprocess that has authorization to revoke the revocable policy.

Depending on the returned results of the request to set the revocablepolicy to PolicyA, process 1402 continues processing (Stage 4). Forexample, if the request to set the revocable policy to PolicyA wassuccessful, process 1402 proceeds with executing the macro. Here, themore restrictive PolicyA is applied to the macro. Alternatively, if therequest to set the revocable policy to PolicyA was unsuccessful, process1402 may not proceed with executing the macro.

Subsequently, for example, after detecting that the macro has finishedexecuting, process 1402 sends, via access control API 1106, a request torevoke my policy, e.g., PolicyA, to operating system 1104 (Stage 5).Process 1402 submits the ‘cookie’ that was previously received fromoperating system 1104 with the request to revoke my policy. In responseto receiving the request to revoke my policy, operating system 1104 usesthe identifier contained in the cookie to authenticate process 1402 as aprocess having authorization to revoke the policy. Subsequent toauthenticating process 1402, operating system 1104 revokes PolicyA, andapplies the policy identified in the cookie to process 1402 (Stage 6).Operating system 1104 returns to process 1402 the results of the requestto revoke my policy (Stage 7), and process 1402 continues processing(Stage 8). In another embodiment, the revoke my policy request mayidentify a policy that is to be applied subsequent to revoking thecurrent revocable policy.

FIG. 15 is a block diagram illustrating a communications flow used bythe facility in some embodiments to perform a client-server accesscontrol check. By way of example, an email client process 1502 may callan email server process 1504 to send an email message to an addressedrecipient (Stage 1). Client process 1502 sends its identifier, e.g., aClientID, as part of the call to server process 1504. In response,before attempting to send the email message to the addressed recipient,server process 1504 performs a check to determine whether client process1504 has sufficient privileges to perform the requested action, e.g., inthis case, send the email to the addressed recipient. Thus, serverprocess 1504 impersonates client process 1502 by assuming the identityof client process 1502 (Stage 2).

Having assumed the identity of client process 1502, server process 1504,sends, via access control API 1106, a request to perform an accesscontrol check to operating system 1104 (Stage 3). The request includesthe identity of client process 1502, e.g., ClientID, and the requestedaction, e.g., send an email message to the addresses recipient.Operating system 1104 performs the access control check and sends serverprocess 1504 an indication of whether client process 1502 hasauthorization to perform the requested action. In some embodiments,operating system 1104 may check an applicable policy in policies 206 todetermine whether client process 1502 has authorization to perform therequested action. In some embodiments, operating system 1104 may utilizeauthorization module 202 to determine whether client process 1502 hasauthorization to perform the requested action. Depending on the resultsof the access control check, server process 1504 either continuesprocessing the email message, e.g., sends the emails message to theaddressed recipient, or stops processing the email message and sendsclient process 1502 an error message. While server process 1504 sent therequest to perform the access control check to operating system 1104 inthe above example, it will be appreciated that server process 1504 mayhave directly invoked authorization module 202 to perform the accesscontrol check.

FIG. 16 illustrates a process by which a policy embedded in anapplication program is extracted, according to some embodiments. Thisallows the policy to be delivered as a part of the software packagecomprising the application, and the policy is extracted and appliedbefore any of the code comprising the application starts executing.Thus, using this approach, if the code contains defects exploited bymalicious code, the attack damage can be reduced and/or contained.

At step 1602, a policy is embedded as part of the code of an applicationprogram. The embedded policy is delimited in the application code. Insome embodiments, the policy within the code is delimited, for example,by placing in the executable code a flag, which indicates to anoperating system or other process suitable for extracting the embeddedpolicy of the presence of the policy. At step 1604, the applicationprogram code is signed to protect the resulting image. Code signingprovides an assurance that the signed image comes from the provider ofthe digital signature, e.g., the signer of the code. Digital signaturesusing a public key and a private key are generally known to those ofordinary skill in the art and, thus, will not be further discussedherein.

Subsequently, at step 1606, a request is made to load the applicationprogram image, for example, on a computer. At step 1608, the operatingsystem, or a loader component of the operating system, checks theintegrity of the application program image. If the operating systemdetermines the integrity of the application program image is notacceptable (step 1610), then at step 1618, the operating system does notload the application program image on the computer. The operating systemmay also generate an error condition and provide an indication of theerror.

Alternatively, if the operating system determines the integrity of theapplication program image is acceptable (step 1610), then at step 1612,the operating system loads the application program image on thecomputer. At step 1614, the operating system checks for the presence ofan embedded policy, and if an embedded policy is detected, extracts thepolicy from the application program image. In some embodiments, theoperating system may store the extracted policy in a policy table orrepository, e.g., policies 206, provided by the operating system. Atstep 1616, the operating system applies the extracted policy to theloaded application program image.

FIG. 17 is a flow chart of a method 1700 by which the facility loads andapplies a policy on a legacy application program, according to someembodiments. By way of example, a legacy application program may bestored on a computer. Wanting to apply a policy to the legacyapplication program without incurring the risks associated withmodifying the legacy application code or the hassles and costsassociated with uninstalling, reinstalling and reconfiguring apotentially large number of legacy application programs, a policy forthe legacy application program may be delivered by a process independentof the legacy application program.

Beginning at a start step, an operating system executing on a computerhosting legacy application program receives a request from a process toload a policy for the legacy application program at step 1702. Forexample, the process may be an instance of an update program executingon the computer. Moreover, in addition to the rules that may be includedin a policy, the policy may further include rules which are dependentand applicable based on information such as, the version of the legacyapplication code, the patch level incorporated in the legacy applicationcode, and the like. At step 1704, the operating system receives thepolicy from the process and loads the policy for the legacy applicationprogram. The operating system may validate the process as beingauthorized to deliver a policy applicable to the legacy applicationprogram. The operating system may also validate the integrity of boththe process and the policy prior to receiving and storing the policy. Insome embodiments, the operating system loads the policy in a policytable or repository and associates the policy to the legacy applicationprogram. The association may be indicated by metadata of the policy.

Subsequently, at step 1706, the operating system receives a request toload the legacy application program. At step 1708, the operating systemchecks to determine if there is a policy that is applicable to thelegacy application program. If the legacy application program does nothave an applicable policy, then at step 1704, the operating system doesnot load the legacy application program. In this instance, the operatingsystem may be configured to only load and execute applications that haveapplicable policies in effect. The operating system may return an errorthat indicates the failure to load the legacy application program.Subsequent to providing the indication of the error, the operatingsystem continues processing.

If, at step 1708, the operating system determines that the legacyapplication program does have an applicable policy, then at step 1710,the operating system loads the legacy application program. At step 1712,the operating system applies the policy to the legacy applicationprogram during its execution, and continues processing.

From the foregoing, it will be appreciated that specific embodiments ofthe invention have been described herein for purposes of illustration,but that various modifications may be made without deviating from thespirit and scope of the invention. Accordingly, the invention is notlimited except in accordance with elements explicitly recited in theappended claims.

1. A computer-readable storage medium whose contents cause a computerto: receive from a first process a request to set a policy on a secondprocess; determine whether the first process possesses adequateprivilege to set the policy on the second process; and responsive todetermining that the first process possesses adequate privilege, set thepolicy on the second process, such that the policy is applied to thesecond process in performing access control checks to determine whetherthe second process has authorization to access a resource.
 2. Thecomputer-readable storage medium of claim 1, wherein the first processis a parent of the second process.
 3. The computer-readable storagemedium of claim 1, wherein the policy is an irrevocable policy.
 4. Thecomputer-readable storage medium of claim 1, wherein the policy is arevocable policy, and further comprising contents that cause thecomputer to: responsive to setting the policy on the second process,return an identifier to the first process.
 5. The computer-readablestorage medium of claim 4, wherein the identifier is returned in acookie.
 6. The computer-readable storage medium of claim 4 furthercomprising computer instructions that cause the computer to: receive arequest to revoke the policy on the second process; authenticate therequest to revoke the policy on the second process; and responsive toauthenticating the request to revoke the policy, revoke the policy onthe second process, such that the policy is no longer applied to thesecond process in performing access control checks to determine whetherthe second process has authorization to access a resource.
 7. Thecomputer-readable storage medium of claim 6, wherein the request torevoke the policy is authenticated by receipt of the identifier.
 8. Thecomputer-readable storage medium of claim 6, wherein the request torevoke the policy is submitted by the first process.
 9. Thecomputer-readable storage medium of claim 6, wherein the request torevoke the policy is submitted by the second process.
 10. Thecomputer-readable storage medium of claim 1, wherein the first processand the second process are the same.
 11. The computer-readable storagemedium of claim 1, wherein the request to set the policy is receivedthrough an API.
 12. The computer-readable storage medium of claim 1,wherein the request to set the policy is a request to set the policy onall process threads of the second process.
 13. The computer-readablestorage medium of claim 1, wherein the request to set the policy is arequest to set the policy on one or more process threads of the secondprocess. A computer-readable storage medium whose contents cause acomputer to:
 14. A computer-readable storage medium whose contents causea computer to: submit a first request to set a self-imposed policy to afirst policy; submit at least one request to access a first resource;submit a second request to set a self-imposed policy to a second policy;and submit at least one request to access a second resource, such thatthe first policy is used to determine whether there is authorization toaccess the first resource, and the second policy is used to determinewhether there is authorization to access the second resource.
 15. Thecomputer-readable storage medium of claim 14, wherein the second policyis more restrictive than the first policy.
 16. The computer-readablestorage medium of claim 14, wherein the second request to set aself-imposed policy to the second policy revokes the first policy. 17.The computer-readable storage medium of claim 14, wherein the secondrequest to set a self-imposed policy to the second policy does notrevoke the first policy.
 18. The computer-readable storage medium ofclaim 14, wherein the second request to set a self-imposed policy to thesecond policy does not revoke the first policy, such that the firstpolicy and the second policy are used to determine whether there isauthorization to access the second resource.
 19. A computer-readablestorage medium whose contents cause a computer to: receive from a firstprocess a request to set a self-imposed revocable policy on itself to afirst policy; set the policy on the first process to the first policy;return an identifier to the first process; receive from the firstprocess at least one request to access a first resource; apply the firstpolicy to the request to access the first resource to determine whetherthe first process has authorization to access the first resource;receive from the first process a request to revoke the first policy;authenticate the request to revoke the first policy; and subsequent toauthenticating the request to revoke the first policy, revoke the firstpolicy.
 20. The computer-readable storage medium of claim 19 furthercomprising contents that cause the computer to, subsequent to revokingthe first policy, set the policy on the first process to a prior policythat was being applied prior to the request to set the self-imposedrevocable policy.
 21. The computer-readable storage medium of claim 20,wherein an indication of the prior policy is submitted by the firstprocess.
 22. The computer-readable storage medium of claim 19, whereinthe identifier is received with the request to revoke the first policy.23. The computer-readable storage medium of claim 19 further comprisingcontents that cause the computer to, subsequent to setting the policy onthe first process to the first policy, return an indication of a priorpolicy which was in effect prior to the request to set the self-imposedrevocable policy.
 24. A computer-readable storage medium whose contentscause a computer to: receive from a first process a request for aresource provided by the process, the request includes an identifier;impersonate the first process; determine whether the first process hasauthorization to request the resource; subsequent to determining thatthe first process has authorization to request the resource, process therequest for the resource.
 25. The computer-readable storage medium ofclaim 24, wherein the process impersonates the first process by assumingthe identity of the first process.
 26. The computer-readable storagemedium of claim 24, wherein the process determines whether the firstprocess has authorization to request the resource by sending a requestto perform an access control check, the request includes the identifierreceived from the first process and an indication of the requestedresource.
 27. The computer-readable storage medium of claim 26, whereinthe request to perform the access control check is made to an operatingsystem.
 28. The computer-readable storage medium of claim 24, whereinthe determination of whether the first process has authorization torequest the resource involves a check of a policy applicable to thefirst process.
 29. A method in a computer system for setting a policy ona controlled process executing on the computer system, the methodcomprising: receiving from a controlling process a request to set apolicy on the controlled process; determining whether the controllingprocess has privilege to set the policy on the controlled process; andresponsive to determining that the controlling process has privilege toset the policy on the controlled process, setting the policy on thecontrolled process, such that the policy is applied to the controlledprocess in performing access control checks to determine whether thecontrolled process has authorization to access a resource.
 30. Themethod of claim 29, wherein the policy is a revocable policy and,subsequent to setting the policy on the controlled process, sending thecontrolling process an identifier for use in requesting a revocation ofthe set policy.
 31. The method of claim 30 further comprising,subsequent to setting the policy on the controlled process, sending thecontrolling process an indication of a prior policy that was in effectbefore setting the policy.
 32. The method of claim 30 furthercomprising: receiving a request to revoke the policy on the controlledprocess; authenticating the request to revoke the policy on thecontrolled process; and responsive to authenticating the request torevoke the policy, revoking the policy on the controlled process. 33.The method of claim 32, wherein the authenticating the request comprisesa check to determine whether the identifier is received as part of therequest to revoke the policy.
 34. The method of claim 32, wherein therequest to revoke the policy is received from the controlling process.35. The method of claim 32, wherein the request to revoke the policy isreceived from the controlled process.
 36. The method of claim 32,wherein the request to revoke the policy is received from a processother than the controlling process or the controlled process.
 37. Themethod of claim 32 further comprising, responsive to authenticating therequest to revoke the policy, setting a prior policy on the controlledprocess that was in effect before setting the policy just revoked. 38.The method of claim 29, wherein the controlled process and thecontrolling process are the same process.
 39. The method of claim 29,wherein the controlled process is an executing thread of the controllingprocess.